Skip to content

fix: Don't prepend "begin stack" to blocks inserted from the flyout#9911

Merged
maribethb merged 2 commits into
RaspberryPiFoundation:v13from
microbit-robert:flyout-begin-stack
May 20, 2026
Merged

fix: Don't prepend "begin stack" to blocks inserted from the flyout#9911
maribethb merged 2 commits into
RaspberryPiFoundation:v13from
microbit-robert:flyout-begin-stack

Conversation

@microbit-robert
Copy link
Copy Markdown
Collaborator

The basics

The details

Resolves

Omits the "begin stack" label to blocks inserted from the flyout in move mode. At this point, the block can be positioned anywhere. It is arguably only a stack once is has been placed on the workspace in a certain position.

Fixes #9802

Proposed Changes

Use the block.isDragging method to determine whether a block is inserted on the workspace in move mode.

Reason for Changes

This reduces the amount of information in the screen reader output which should make it easier to parse for screen reader users. Arguably improves the label accuracy.

Test Coverage

None

Documentation

No

Additional Information

N/A

@microbit-robert microbit-robert requested a review from a team as a code owner May 20, 2026 16:34
@microbit-robert microbit-robert requested a review from mikeharv May 20, 2026 16:34
@github-actions github-actions Bot added the PR: fix Fixes a bug label May 20, 2026
@microbit-robert microbit-robert marked this pull request as draft May 20, 2026 16:39
@microbit-robert
Copy link
Copy Markdown
Collaborator Author

Hmm, moving back to draft.

It feels like block.workspace.isDragging() should cover this case in the getBeginStackLabel function, but does not. What is the difference between block.workspace.isDragging() and block.isDragging()?

@microbit-robert
Copy link
Copy Markdown
Collaborator Author

Ok. KeyboardMover.mover.isMoving() is false at the time the block label is calculated. Presumably this is because the block is place on the workspace and then put into move mode.

I propose switching block.workspace.isDragging() for block.isDragging() which is true at the time the label is calculated. This address removing the "being stack" prefix for blocks inserted from the flyout and for other blocks already on the workspace put into move mode. Is there any reason we can't do this?

@maribethb
Copy link
Copy Markdown
Contributor

workspace.isDragging is I think if the workspace itself is being dragged. I think that was just straight up a mistake in the original PR, whoops. Thanks for catching this!

@maribethb maribethb marked this pull request as ready for review May 20, 2026 20:36
@maribethb maribethb merged commit d717245 into RaspberryPiFoundation:v13 May 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants